package com.hh.admin.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 
 * </p>
 *
 * @author hxn
 * @since 2018-02-09
 */
@TableName("sys_login_log")
public class SysLoginLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 登录类型  1 登录 2退出 3 登录失败
     */
	private Integer type;
    /**
     * 用户ID
     */
	@TableField("user_id")
	private Long userId;
	
	/**
	 * 用户账号
	 */
	@TableField("user_account")
	private String userAccount;
    /**
     * IP地址
     */
	private String ip;
    /**
     * 创建时间
     */
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private Date createTime;

	public SysLoginLog(){
		
	}
	
	public SysLoginLog(Integer type,Long userId,String ip,String userAccount){
		this.type = type;
		this.userId = userId;
		this.ip = ip;
		this.userAccount = userAccount;
	}
	
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUserAccount() {
		return userAccount;
	}

	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}

	@Override
	public String toString() {
		return "SysLoginLog{" +
			"id=" + id +
			", type=" + type +
			", userId=" + userId +
			", userAccount=" + userAccount +
			", ip=" + ip +
			", createTime=" + createTime +
			"}";
	}
}
